package svc

import (
	"center-data-platform/app/search/api/internal/config"
	"center-data-platform/app/search/rpc/client/searchservice"
	"github.com/zeromicro/go-zero/zrpc"
)

type ServiceContext struct {
	Config    config.Config
	SearchRpc searchservice.SearchService
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:    c,
		SearchRpc: searchservice.NewSearchService(zrpc.MustNewClient(c.SearchRpc)),
	}
}
